﻿using zijian666.Abstractions;

namespace zijian666.Translator;
/// <summary>
/// 全角字符翻译器
/// </summary>
public class DBCTranslator : ITranslator
{
    /// <inheritdoc />
    public bool TryTranslate(IConvertContext context, object? input, out object? translated)
    {
        if (input is string str)
        {
            translated = Converts.ToDBC(str);
            return !ReferenceEquals(translated, str);
        }
        translated = null;
        return false;
    }
}
